package class_1_8.abstract_test;

abstract class A{
    //抽象方法
    public A() {
        this.print();
    }
    public abstract void print();
}

 public class B extends A {

    int num=10;
    public B(int num){
        this.num=num;
    }
     @Override
     public void print() {
         System.out.println("num="+num);
     }

     public static void main(String[] args) {
         new B(199);
     }
 }
